package info.ask4research.service.impl;

import info.ask4research.dao.IGraphDAO;
import info.ask4research.dao.core.AbstractDao;
import info.ask4research.dao.impl.GraphDAO;
import info.ask4research.model.Graph;
import info.ask4research.service.IGraphService;
import info.ask4research.service.core.impl.AbstractServiceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service(value="graphService")
@Transactional
public class GraphService extends AbstractServiceImpl<Graph> implements IGraphService{

	@Resource(name = "graphDAO")
	private IGraphDAO dao;

	@Override
	public AbstractDao<Graph> getDao() {
		return dao;
	}

	@Override
	public void setDao(AbstractDao<Graph> dao) {
		this.dao = (GraphDAO) dao;
	}

	@Override
	public List<Graph> getPaginated(int limit, int page, int start) {
		return dao.getPaginated(limit, page, start);
	}

	@Override
	public Graph getByHtmlCode(String htmlCode) {
		return dao.getByHtmlCode(htmlCode);
	}
}
